package com.itheima.tlias84.mapper;

import com.itheima.tlias84.dto.SelectLearnerDTO;
import com.itheima.tlias84.dto.SelectLearnerDetailDTO;
import com.itheima.tlias84.po.InsertLearnerParam;
import com.itheima.tlias84.po.SelectLearnerPageParam;
import com.itheima.tlias84.po.UpdateLearnerParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface LearnerMapper {




    //分页查询
    List<SelectLearnerDTO> selectLearnerByPage(@Param("p")SelectLearnerPageParam param);

    //添加学生
    int insertLearner(@Param("p")InsertLearnerParam param);

    //根据id查询
    SelectLearnerDetailDTO selectLearnerById(@Param("id") Integer id);

    //修改学员信息
    int updateLearner(@Param("p")UpdateLearnerParam param);

    //批量删除
    int batchDeleteLearnerByIds(@Param("ids")List<Integer> ids);

    //违纪处理
    int vioScore( @Param("id") Integer id,@Param("sc")Integer score);


}
